#include "avatar.h"

#include <QUuid>

Avatar::Avatar(const QString &uuid, const QString &name, const double &score, QObject *parent)
    : QObject(parent), uuid_(uuid), name_(name), score_(score)
{

}

Avatar::Avatar(const QString &name, QObject *parent)
    : QObject(parent), name_(name), score_(0)
{
    QUuid uuid_gen = QUuid::createUuid();
    uuid_ = uuid_gen.toString(QUuid::WithoutBraces);
}

Avatar::Avatar(QObject *parent)
    : QObject(parent), score_(0)
{

}

Avatar::Avatar(const Avatar &rhs)
    : QObject(rhs.parent()), uuid_(rhs.uuid_), name_(rhs.name_), score_(rhs.score_)
{

}

Avatar *Avatar::operator=(const Avatar &rhs)
{
    uuid_ = rhs.uuid_;
    name_ = rhs.name_;
    score_ = rhs.score_;
    return this;
}

QString Avatar::uuid() const
{
    return uuid_;
}

void Avatar::setUuid(const QString &newUuid)
{
    uuid_ = newUuid;
}

QString Avatar::name() const
{
    return name_;
}

void Avatar::setName(const QString &newName)
{
    name_ = newName;
}

double Avatar::score() const
{
    return score_;
}

void Avatar::setScore(double newScore)
{
    score_ = newScore;
}
